import Vue from 'vue'
import Vuex from 'vuex'
//大型项目一般会进行vuex模块式开发将大仓库划分成多个小仓库
Vue.use(Vuex)
//引入小仓库
import home from './home';
import search from './search';
import detail from './detail';
import shopcart from './shopcart';
import user from './user';
import trade from './trade';
export default new Vuex.Store({
  
  //实现vuex仓库模块式开发  存储数据(在modules里注册小仓库)
  modules:{
    home,
    search,
    detail,
    shopcart,
    user,
    trade
  },
 /*  state: {

  },
  getters: {
  },
  mutations: {
  
  },
  actions: {
  
  },
  modules: {
  } */
})
